A motor controller which controls feedback control for a motor is used for causing the motor to drive a driven object. For that purpose, the motor controller generates a speed command value for the motor on the basis of an error between a position command value for the motor and the actual position (for example, the rotation angle) of the motor, and a position control gain.
The position command value for the motor is input from a host controller into the motor controller. The host controller generates the position command value for the motor by analyzing data included in an operation process program (for example, a press program) for a driven object driven by the motor to perform a predetermined operation. The host controller then outputs the generated position command value for the motor to the motor controller.
Conventionally, as a host controller that outputs a position command value for a motor to a motor controller, a host controller has been proposed that changes a parameter such as a position control gain based on the position of either the motor or the driven object driven by the motor in order to ensure the stability of control and the quickness of operations of the motor controller (for example, see Japanese Unexamined Patent Publication No. JP-A-2004-30500).
In some situations, the speed of the motor needs to be reduced in order to operationally check and adjust the driven object driven by the motor before the driven object performs a predetermined operation. In such a situation, an override for changing the speed of the motor (for example, reducing the speed of the motor below a programmed speed) is performed while the driven object is being driven by the motor. In order to override, the host controller causes the motor controller to generate a speed command value for the motor which is set according to an override value. For example, the host controller causes the motor controller to generate a speed command value for the motor that is equal to the product of a speed command value for the motor taken when the override value is 1 and an override value (for example, 0.5). To accomplish this, the host controller generates a motor speed command value for the motor taken when the override value is a set override value (for example, 0.5) on the basis of a position command value for the motor taken when the override value is 1 and the set override value. The host controller then outputs the generated position command value to the motor controller.
However, the override changes the position deviation between a position command value for the motor and the actual position of the motor, leading to a change in the motion trajectory of the driven object driven by the motor. The change in the motion trajectory can adversely affect the stability of control and the quickness of operation of the motor controller. In order to avoid the adverse effect of a change in the motion trajectory on the control stability and operation quickness of the motor controller, the motor controller needs to be controlled so as to keep the motion trajectory of the driven object driven by the motor constant, irrespective of a change in the override value.
An object of the present invention is to provide a host controller capable of controlling a motor controller so as to keep the motion trajectory of a driven object driven by a motor constant, irrespective of a change in an override value.